Fix a test case error in gdb caused by excessive bogusness. I have No Idea
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 31 Dec 2013 06:06:44 +0000 (06:06 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 31 Dec 2013 06:06:44 +0000 (06:06 +0000)
why extra_data is involved in this path.

git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4671 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/gdb.cc
gpsbabel/netstumbler.cc

index eb5268c551bf7c7d12e3a82d3f57187cfd07de88..f9dfdc01e32faf07050ba51cee44121343c239ac 100644 (file)
@@ -1828,7 +1828,10 @@ write_waypoint_cb(const waypoint* refpt)
     name = mkshort(short_h, name);
 #if NEW_STRINGS
     // This is sooooo tacky.
-    wpt->extra_data = static_cast<void*>(&name);
+    // Actually, it's not just tacky.  I can't figure out what this code
+    // was trying to do, but it's wrong and it breaks things.  
+    //   robertl 2013-12-30.
+    // wpt->extra_data = static_cast<void*>(&name);
 #else
     wpt->extra_data = (void*)name;
 #endif
index 577b328158551f052f0255e8522d2f6311be6fb1..83e06a1e71b1b50a35fbc6dc09af2106db9ee0d1 100644 (file)
@@ -296,7 +296,6 @@ fix_netstumbler_dupes(void)
   int i, ct = waypt_count(), serial = 0;
   htable_t* htable, *bh;
   unsigned long last_crc;
-  char ssid[32 + 5 + 1];
 
   htable = (htable_t*) xmalloc(ct * sizeof *htable);
   bh = htable;
@@ -330,6 +329,7 @@ fix_netstumbler_dupes(void)
 #if NEW_STRINGS
       bh->wpt->shortname += QString("/%1").arg(++serial);
 #else
+      char ssid[32 + 5 + 1];
       snprintf(ssid, sizeof ssid, "%s/%d", CSTRc(bh->wpt->shortname), ++serial);
       xfree(bh->wpt->shortname);
       bh->wpt->shortname = xstrdup(ssid);